<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>部门列表</title>
		<script>
	  
	  function ischeck(){
			var v=document.getElementsByName("deptid");
			var flag=0;
			for(var i=0;i<v.length;i++){
				if(v[i].checked){
					flag=1;
				}
			}
			if(flag==1){
				document.deptform.submit();
			}
		}
	  
	  
	</script>
	</head>
	<body>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td width="17" valign="top" background="images/mail_leftbg.gif">
					<img src="images/left-top-right.gif" width="17" height="29" />
				</td>
				<td valign="top" background="images/content-bg.gif">
					<table width="100%" height="31" border="0" cellpadding="0"
						cellspacing="0" class="left_topbg" id="table2">
						<tr>
							<td height="31">
								<div class="titlebt">
									部门列表
								</div>
							</td>
						</tr>
					</table>
				</td>
				<td width="16" valign="top" background="images/mail_rightbg.gif">
					<img src="images/nav-right-bg.gif" width="16" height="29" />
				</td>
			</tr>
	</table>
<br />
<br />
<br />
<form  action="<%=basePath %>yun/empAction.action" name="deptform" method="post">
<center>
	<table  width="99%" cellspacing="1" cellpadding="3" border="0" bgcolor="#6298e1">
	<tbody>
		<tr>
		    <td  width="40" nowrap="" height="25" background="Admin_Poli.files/th_bg.gif" align="center">
				部门编号
			</td>
			<td width="60" nowrap="" background="Admin_Poli.files/th_bg.gif" align="center">
				部门名称
			</td>
			
			<td  width="60" nowrap="" background="Admin_Poli.files/th_bg.gif" align="center">
				备注
			</td>
			<td width="60" nowrap="" background="Admin_Poli.files/th_bg.gif" align="center">
			       部门经理
		    </td>
			<td width="60" nowrap="" background="Admin_Poli.files/th_bg.gif" align="center">
			        查询
			</td>
		</tr>
		<s:iterator var="dept" value="deptlist" >
		<tr bgcolor="#ebf2f9" onmouseout="this.style.backgroundColor = ''" style="" onmouseover="this.style.backgroundColor = '#FFFFFF'">
			<td nowrap="" height="24" align="center">
				${dept.deptid}
			</td>
			<td nowrap="" height="24" align="center">
				<s:property value="#dept.deptname" />
			</td>
			<td nowrap="" height="24" align="center">
				<s:property value="#dept.deptnote" />
			</td>
			<td nowrap="" height="24" align="center">
				${dept.UUser.uname}
			</td >
			<td nowrap="" height="24" align="center">
			 <input type="radio" id="ra" name="deptid" value="${dept.deptid}"/></td>
			</tr>
			
			</s:iterator>
			</tbody>
		</table>
		
		<br/>
		<br/>
		   <input type="button" value="部门员工" onclick="ischeck()"/>
		</form>
        <br/>
        <br/>
        <br/>
        <br/>
		<s:if test="%{page==1}">
			&lt;&lt; 首页 &lt; 上一页
		</s:if>
		<s:else>
		  <a href="<%=basePath %>yun/deptList.action?page=1">首页</a>
		  <a href="<%=basePath %>yun/deptList.action?page=${page-1}"> 上一页</a>
		</s:else>				
		<s:if test="%{page == endpage}">
		   下一页 &gt;
		   末页 &gt;&gt;
		</s:if>
		<s:else>
		  <a href="<%=basePath %>yun/deptList.action?page=${page+1}" target="_top"> 下一页 &gt;</a>
		  <a href="<%=basePath %>yun/deptList.action?page=${endpage}">末页 &gt;&gt;</a>
		</s:else>
		  第${page}页
		  共${endpage}页
		<br />
		<br />
		<br />
		<div style="margin-left:180px">
		<table width="99%" align="center">
			<tr>
				<td class="left_txt">
								<img src="images/icon-mail2.gif" width="16" height="11">
								&nbsp;&nbsp;&nbsp;&nbsp;邮箱：liuyongwade@gmail.com
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								组员：刘勇&nbsp;&nbsp;程署&nbsp;&nbsp;陈皓&nbsp;&nbsp;席晓明&nbsp;&nbsp;刘广云
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;版权所有 侵权必究
							</td>
						</tr>
						</table>
						</div>
   </center>
		
</span>			         
	</body>
</html>
